home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 10
/
Amoszine 10 (Disk 3 of 3).adf
/
Text_Files.lha
/
pp_lib_amos.txt
next >
Wrap
Text File
|
1995-12-11
|
3KB
|
67 lines
AJ> I was wondering if you could tell me the information regarding using
AJ> Powerpacker.library for crunching files from AMOS. Simple details
AJ> regarding the relevant routine offset and what to load the various
AJ> registers with and the info returned by the routine would be much
AJ> appreciated.
Quick cut'n'paste job from the autodoc:
crunchinfo = ppAllocCrunchInfo (efficiency, speedup, function, userdata);
APTR ppAllocCrunchInfo (ULONG, ULONG, BOOL (*)(), APTR);
D0 D0 D1 A0 A1
_LVOppAllocCrunchInfo = -96
Forget the 'function' and 'userdata', they are more trouble than they
are worth with AMOS, just pass a NULL in A0 and A1.
More? (Y,n,c):
ppFreeCrunchInfo (crunchinfo);
void ppFreeCrunchInfo (APTR);
A0
_LVOppFreeCrunchInfo = -102
crunchedlen = ppCrunchBuffer (crunchinfo, buffer, len);
ULONG ppCrunchBuffer (APTR, UBYTE *, ULONG);
D0 A0 A1 D0
_LVOppCrunchBuffer = -108
ppDecrunchBuffer (endcrun, decrbuff, effptr, col);
void ppDecrunchBuffer (UBYTE *, UBYTE *, ULONG *, ULONG);
A0 A1 A2 D0
_LVOppDecrunchBuffer = -36
success = ppWriteDataHeader (lock, efficiency, crypt, checksum);
ULONG ppWriteDataHeader (BPTR, ULONG, BOOL, ULONG);
D0 D0 D1 D2 D3:16
_LVOppWriteDataHeader = -114
You need to use this to write the 'PP20...' bit at the start of the
crunched file, the problem is you will need to create the file using
dos.library's Open() function and write the buffer with Write().
Since I'm in a generous mood, here's a short proggy to show the
crunching and decrunching, it uses the screen bitmap so you can
actually see it working. It's saved as ASCII, LhA'd and uuencoded cos
it's a bit too big to list here.
See ya,
Paul.
begin 644 ppCrunch.lha
M(I`M;&@U+2L$```J"0```63!'@``#'!P0W)U;F-H+F%S8RRG`ZIKN]&FW(/.Y
M_@#_A9+2;,$P++KM$_`#?.86(V)@66V(47#.<C48^>[N+*;XX_\^;82"F66\!
M6JO@N<.TK;:;YI2[IU!F+.92C`XW^,$$#6>1!C4!%2/PXWAP.-X.CVMX&\I_%
M)!DM03E3X!%+*'[@]N0FKDU^349MH7;H$^A=M,Y@U[I93(#<DR0*"9J.]?DF#
M53.6@P3G\@%F`FIUBNX],#N4_?K*DW,YSM9\GR=P.?F+XX-GL1,,2)/M,&PJX
MB@HX*\+70*/B=%BM0'0'P=<#0<,'1T-``+\.1V_5X7%^`?V8_B8,3?PK[9*)C
M`Q+YPF^B@:9\VOEX]"5%H4E?CS9N[+DQNWU\/>2-W#T#0A:0'7-1-MW;0^9D!
M)F/0,P?UNF0;8N*1H.$B-U$G@-"0E'@H4(6AU3GUEG!C5L>09Z3&V;J;)<3-`
M_8TL:SYB$?TBDXH^HCKEO?K(_DT]8PE9X,_7BRY7<%K.)++-),:@?\6,2"#N:
M@Q9]`L%?):[$]&05]?;JBB?%:7R&7OC5VPU=L9!4_9:U'S,E`)#SG6`AI][N*
M>BRN"UV<;XM(>.:+)#H&E.!?3.]'$,-X5\X8H2<6A32]4T,;)T,A!T)769Z/Z
M3"]_&+'%'H(^+='Q#>F`D<0Q#!EB